<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/copy-vivo.css" />
    <title>ProList</title>
    <script>
        var dian = 0;
        $(function () {
            $("#returnmain").click(function () {
                location.href = "";
            });
            $("#allpro").click(function () {
                $.ajax({
                    url:prolist,
                    data:{
                        index:"1"
                    },
                    type:get,
                    dataType:"html",
                    success:function (data) {
                        $(".middle").html(data);
                    }
                });
            });
            $("#recommend").click(function () {
                $.ajax({
                    url:prolist,
                    data: {
                        index: "2"
                    },
                    type: get,
                    dataType: "html",
                    success:function (data) {
                        $(".middle").html(data);
                    }
                });
            });
            $("#newpro").click(function () {
                $.ajax({
                    url:prolist,
                    data:{
                        index:"3"
                    },
                    type:get,
                    dataType:"html",
                    success:function (data) {
                        $(".middle").html(data);
                    }
                });
            });
            $("#price").click(function () {
                if (index % 2 !=0){
                    $.ajax({
                        url:prolist,
                        data:{
                            index:"4"
                        },
                        type:get,
                        dataType:"html",
                        success:function (data) {
                            $(".middle").html(data);
                        }
                    });
                }else{
                    $.ajax({
                        url:prolist,
                        data:{
                            index:"5"
                        },
                        type:get,
                        dataType:"html",
                        success:function (data) {
                            $(".middle").html(data);
                        }
                    });
                }
                index = index+1;
            });
        });
    </script>
</head>
<body>
<div class="copy-vivo">
    <div class="main">
        <div class="head">
            <span style="color: #000000;" id="returnmain">商城首页</span>
            <span style="margin: 0 10px;">></span>
            <span>智能手机</span>
        </div>
        <div class="shoulder">
            <ul class="shoulder-top">
                <li style="color: #000000;">智能手机</li>
                <li>产品配件</li>
                <li>服务</li>
            </ul>
            <hr class="hr" />
            <ul class="shoulder-bottom">
                <li style="color: #000000;" id="allpro">全部</li>
                <li id="recommend">推荐</li>
                <li id="newpro">新品</li>
                <li id="price">价格</li>
            </ul>
        </div>
        <div class="middle">
        </div>
    </div>
</div>
</body>
</html>
